# menu/models.py
from datetime import datetime
from django.db import models


class Menu(models.Model):

	id = models.IntegerField(primary_key=True, editable=False)
	name = models.CharField(verbose_name='菜单名',max_length=50)
	icon = models.CharField(verbose_name='图标',max_length=50, null=True)
	url = models.CharField(verbose_name='链接地址',max_length=255, null=True)
	parent = models.ForeignKey("self", verbose_name='父级目录', on_delete=models.SET_NULL, null=True, blank=True)

	class Meta:
		verbose_name = '左侧菜单表'
		verbose_name_plural = verbose_name